<include file="Common/header" />
<title>统计图</title>
<script type="text/javascript" src="__PUBLIC__/h-ui/lib/echarts.min.js"></script>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 数据分析
    <span class="c-gray en">&gt;</span> 当月每日退房统计
    <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div class="pd-20">
    <div id="myChart" style="height:400px; width: 800px; float: left; padding-left: 200px;"></div><br />
	<div style="padding-top: 450px; padding-left: 250px;">
		<h3>截止<?php echo date('Y年m月d日'); ?>，本月退房{$nowcount}间，退还押金{$nowcount}户，弃租0户。本月退还押金￥{$count}元，押金转收入￥0.00元 </h3>
	</div>
</div>
<script>
    $(document).ready(function(){
        //加载图表  
        var myChart = echarts.init(document.getElementById("myChart"));
		var xAxisData = [];
		var seriesData = {$attr};
			//seriesData = JSON.parse({$attr});
			
		for(var i=1;i<={$lastday};i++){
			xAxisData.push(i+'号');
			/*
			{
				value: '周一',
				// 突出周一
				textStyle: {
					fontSize: 20,
					color: 'red'
				}
			}*/
		}
		
        myChart.setOption({
			color: ['#3398DB'],
            title : {
                text: '当月每日退房统计',
                subtext: '',
            },
            tooltip : {
                trigger: 'axis',
				axisPointer : {            // 坐标轴指示器，坐标轴触发有效
					type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
				}
            },
            legend: {
                data:['退房数']
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
			axisLabel :{  
				interval:0   
			},
            xAxis : [
                {
                    type : 'category',
                    data : xAxisData,
                    axisTick: {
                        alignWithLabel: true
                    },
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    name:'退房数',
                    type:'bar',
					barWidth: '40%',
                    data: seriesData
                }
            ]
        });
    });
</script>